package com.chenbei.common.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Setter;

@Setter
@Schema(description = "分页请求")
public class PageRequest {

    //页码
    private Long pageNum;

    //条数
    private Long pageSize;

    public Long getPageNum() {
        return (pageNum == null || pageNum <= 1) ? 1 :  pageNum;
    }

    public Long getPageSize() {
        return (pageSize == null || pageSize <= 1) ? 10 : pageSize;
    }

}
